



<div class="module_common">
    <h2 class="common_title veins1">
        <div class="ornament1"></div>
        <div class="ornament2"></div>
        <span class="ico1"><span class="ico2">商品分类</span></span>
    </h2>
    <div class="wrap_child">
        <ul class="submenu">
            <li><span class="none_ico"></span><a href="<?php echo url('app=store&id=' . $this->_var['store']['store_id']. '&act=search'); ?>">全部商品</a></li>
            <?php $_from = $this->_var['store']['store_gcates']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'gcategory');if (count($_from)):
    foreach ($_from AS $this->_var['gcategory']):
?>
            <?php if ($this->_var['gcategory']['children']): ?>
            <li>
                <span class="block_ico"></span><a  href="<?php echo url('app=store&id=' . $this->_var['store']['store_id']. '&act=search&cate_id=' . $this->_var['gcategory']['id']. ''); ?>"><?php echo htmlspecialchars($this->_var['gcategory']['value']); ?></a>
                <ul>
                    <?php $_from = $this->_var['gcategory']['children']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'child_gcategory');if (count($_from)):
    foreach ($_from AS $this->_var['child_gcategory']):
?>
                    <li><a href="<?php echo url('app=store&id=' . $this->_var['store']['store_id']. '&act=search&cate_id=' . $this->_var['child_gcategory']['id']. ''); ?>"><?php echo htmlspecialchars($this->_var['child_gcategory']['value']); ?></a></li>
                    <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
                </ul>
            </li>
            <?php else: ?>
            <li><span class="none_ico"></span><a href="<?php echo url('app=store&id=' . $this->_var['store']['store_id']. '&act=search&cate_id=' . $this->_var['gcategory']['id']. ''); ?>"><?php echo htmlspecialchars($this->_var['gcategory']['value']); ?></a></li>
            <?php endif; ?>
            <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
        </ul>
  </div>
    <script>
        $(function(){
            $('.wrap_child .submenu li ul').hide();
            $('.wrap_child .submenu span').click(function(){
                if($(this).hasClass('block_ico'))
                {
                    $(this).removeClass('block_ico').addClass('none_ico');
                }else
                {
                    $(this).removeClass('none_ico').addClass('block_ico');
                }
                $(this).siblings().filter('ul').toggle();

            });
        })
    </script>
</div>

<?php if ($_GET['app'] == "store" && $_GET['act'] == "index"): ?>
<div class="module_common">
    <h2 class="common_title veins1">
        <div class="ornament1"></div>
        <div class="ornament2"></div>
        <span class="ico1"><span class="ico2">partner</span></span>
    </h2>
    <div class="wrap_child">
        <ul class="submenu">
            <?php $_from = $this->_var['partners']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'partner');if (count($_from)):
    foreach ($_from AS $this->_var['partner']):
?>
            <li><a class="link_ico" href="<?php echo $this->_var['partner']['link']; ?>" target="_blank"><?php echo htmlspecialchars($this->_var['partner']['title']); ?></a></li>
            <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
        </ul>
    </div>
</div>
<?php endif; ?>

<?php if ($_GET['app'] == "goods"): ?>
<div class="module_common">
    <h2 class="common_title veins1">
        <div class="ornament1"></div>
        <div class="ornament2"></div>
        <span class="ico1"><span class="ico2">浏览历史</span></span>
    </h2>
    <div class="wrap_child">
        <ul class="annals">
            <?php $_from = $this->_var['goods_history']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'gh_goods');if (count($_from)):
    foreach ($_from AS $this->_var['gh_goods']):
?>
            <li><a href="<?php echo url('app=goods&id=' . $this->_var['gh_goods']['goods_id']. ''); ?>"><img src="<?php echo $this->_var['gh_goods']['default_image']; ?>" width="50" height="50" alt="<?php echo htmlspecialchars(sub_str($this->_var['gh_goods']['goods_name'],20)); ?>" title="<?php echo htmlspecialchars($this->_var['gh_goods']['goods_name']); ?>" /></a></li>
            <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
        </ul>
    </div>
</div>
<?php endif; ?>